package com.sky.service;


import com.sky.dto.CategoryDTO;
import com.sky.dto.CategoryPageQueryDTO;
import com.sky.entity.Category;
import com.sky.result.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;

import java.util.List;

public interface CategoryService {
    /**
     * 新增分类
     * @param categoryDTO
     * @return
     */
    public Result addCategory(CategoryDTO categoryDTO);

    /**
     * 分页查询
     * @param categoryPageQueryDTO
     * @return
     */
    public Result pageCategory(CategoryPageQueryDTO categoryPageQueryDTO);

    /**
     * 根据id删除分类
     * @param id
     * @return
     */
    public Result deleteCategory(Long id);

    /**
     * 修改分类
     * @param category
     * @return
     */
    public Result updateCategory(Category category);

    /**
     * 启动/禁用分类
     * @param status
     * @param id
     * @return
     */
    public Result updateStatus(@PathVariable Integer status,Long id);

    /**
     * 按照类型查找
     * @param type
     * @return
     */
    public List<Category> selectType(Integer type);
}
